<template>
  <div class="searchTips-container">
    <van-list finished-text="没有更多了" :finished="finished">
      <van-cell
        v-for="(item, index) in searchTipsList"
        :key="index"
        :title="item"
        @click="cellClick(item)"
      />
    </van-list>
  </div>
</template>

<script>
export default {
  name: 'SearchTips',
  props: {
    searchTipsList: {
      type: Array
    }
  },
  data() {
    return {
      finished: true
    }
  },
  methods: {
    cellClick(val) {
      // console.log(val)
      // 定义一个自定义事件并触发，以及发送数据到父组件
      this.$emit('cellClick', val)
    }
  }
}
</script>

<style lang="less" scoped></style>
